package com.example.homework1.Controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SquareController {

    @GetMapping("/square/{number}")
    public String getSquare(@PathVariable("number") int number) {
        int a=number*number;
        return "<div style=\"text-align:center;\">" + a + "</div>";
    }
}
